import { useRef, useEffect } from "react";

import Parent from "./Parent";
import Context from "./context";
import { useState } from "react";
const App = () => {
  const [count, setCount] = useState(0);

  return (
    <Context.Provider value={count}>
      <div className="app">
        根组件：{count} <button onClick={() => setCount(count + 1)}>打豆豆</button>
        <hr />
        <Parent />
      </div>
    </Context.Provider>
  );
};

export default App;
